package com.foreknow.demo2;

import java.util.Scanner;

public class ControllerDemo3 {
    public static void main(String[] args) {
        System.out.println("请输入会员的积分：");
        Scanner input = new Scanner(System.in);
        int custScore = input.nextInt();
        double discount = 0.0;
        if (custScore < 2000){
            discount = 0.9;
        }
        else if (custScore >= 2000 && custScore < 4000){
            discount = 0.8;
        }
        else if (custScore >= 4000 && custScore < 8000){
            discount = 0.7;
        }
        else{
            discount = 0.6;
        }
        System.out.println("会员享受的折扣是："+discount);
    }
}
